//
//  PJInitializer.h
//  JOlib
//
//  Created by Pang Jun on 2/11/13.
//  Copyright (c) 2013 Pang Jun. All rights reserved.
//

#ifndef __JOlib__PJInitializer__
#define __JOlib__PJInitializer__

template <class TSRC, class TVALUE>
inline void initialize(TSRC* ptr, const TVALUE& value)
{
    new (ptr) TSRC(value);
}

template <class TSRC>
inline void unintialize(TSRC* ptr)
{
    ptr->~TSRC();
}
#endif /* defined(__JOlib__PJInitializer__) */
